package it.zqdszb.mvp.presenter;

import java.util.List;

import it.zqdszb.entity.HotChannelBean;
import it.zqdszb.entity.PlayLinkListBean;
import it.zqdszb.mvp.callback.OnGetPlayLinkCallBack;
import it.zqdszb.mvp.callback.OnTvRecommendCallBack;
import it.zqdszb.mvp.contract.TvRecommendContract;

/**
 * Created by GH on 2018-05-13.
 */

public class TvRecommendPresenter extends TvRecommendContract.TvRecommendConPresenter implements OnTvRecommendCallBack,OnGetPlayLinkCallBack{
	@Override
	public void onSuccess(List<HotChannelBean> result) {
		getView().showView(result);
	}


	@Override
	public void onFailed(String  mothead) {
		getView().showError(mothead);
	}

	@Override
	public void onSuccessPlayLink(List<PlayLinkListBean> result) {
		getView().goPlay(result);
	}

	@Override
	public void onFailedPlayLink(String mothead) {
		getView().showError(mothead);
	}


	@Override
	public void getData() {
		mModel.fetchData(this);
	}

	@Override
	public void getPlayLink(String channerlId) {
		mModel.getPlayLink(this, channerlId);
	}
}
